<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="redis" uri="http://www.shopjsp.com/redisTag/functions" %>
<c:set var="basePath" value="${redis:getSysConfig('base_path_back')}"/>
<script type="text/javascript">
    /**
     * 查看热门商圈详情
     */
    function detailInfo(id){
        $.ajax({
            type: "POST",
            dataType: "JSON",
            url: "${basePath}/back/shops/getShopsObject.sjson",
            data: {shopsId:id},
            success: function(result){
                var data = JSON.parse(result.data);
                /**重置详情页中所有html展示信息**/
                resetDetailTable("detailTable");
                /**设置展示信息**/
                var shopShops = data.shopShops;
                $("#d_shopsName").html(shopShops.shopsName);
                $("#d_shopsCode").html(shopShops.shopsCode);
                $("#d_regionLocation").html(data.basicAreaRegionLocation.name);
                $("#d_city").html(data.basicAreaCity.name);
                $("#d_address").html(shopShops.address);
                $("#d_note").html(shopShops.note);
                if(shopShops.createTime !=""&&shopShops.createTime!=undefined){
                    $("#d_createTime").html(new Date(shopShops.createTime).Format("yyyy-MM-dd hh:mm:ss"));
                }else{
                    $("#d_createTime").html("");
                }
                if(shopShops.modifyTime !=""&&shopShops.modifyTime!=undefined){
                    $("#d_modifyTime").html(new Date(shopShops.modifyTime).Format("yyyy-MM-dd hh:mm:ss"));
                }else{
                    $("#d_modifyTime").html("");
                }
            }
        });
    }

</script>

<!--详情模态框（Modal） -->
<div class="modal fade" id="detailModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" >
	<div class="modal-dialog" style="width:70%">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<h5 class="modal-title" id="myModalLabel">热门商圈详情</h5>
			</div>
			<div class="modal-body">
				<table id="detailTable" align="center" class="addOrEditTable table table-bordered" style="width:100%;">
					<tr>
						<td class="toright_td" width="150px">商城名称:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_shopsName"></span></td>
						<td class="toright_td" width="150px">商城编码:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_shopsCode"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">省州:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_regionLocation"></span></td>
						<td class="toright_td" width="150px">城市:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_city"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">详细地址:</td><td  class="toleft_td" colspan="3">&nbsp;&nbsp;<span id="d_address"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">备注:</td><td  class="toleft_td" colspan="3">&nbsp;&nbsp;<span id="d_note"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">创建时间:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_createTime"></span></td>
						<td class="toright_td" width="150px">修改时间:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_modifyTime"></span></td>
					</tr>
				</table>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>
